package com.imc.beans;

import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 * TbDutyNewsgroupId entity. @author MyEclipse Persistence Tools
 */
@Embeddable
public class TbDutyNewsgroupId implements java.io.Serializable {

	// Fields

	private short ngpId;
	private short udId;
	private short groupopId;

	// Constructors

	/** default constructor */
	public TbDutyNewsgroupId() {
	}

	/** full constructor */
	public TbDutyNewsgroupId(short ngpId, short udId, short groupopId) {
		this.ngpId = ngpId;
		this.udId = udId;
		this.groupopId = groupopId;
	}

	// Property accessors

	@Column(name = "ngp_id", nullable = false)
	public short getNgpId() {
		return this.ngpId;
	}

	public void setNgpId(short ngpId) {
		this.ngpId = ngpId;
	}

	@Column(name = "ud_id", nullable = false)
	public short getUdId() {
		return this.udId;
	}

	public void setUdId(short udId) {
		this.udId = udId;
	}

	@Column(name = "groupop_id", nullable = false)
	public short getGroupopId() {
		return this.groupopId;
	}

	public void setGroupopId(short groupopId) {
		this.groupopId = groupopId;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TbDutyNewsgroupId))
			return false;
		TbDutyNewsgroupId castOther = (TbDutyNewsgroupId) other;

		return (this.getNgpId() == castOther.getNgpId())
				&& (this.getUdId() == castOther.getUdId())
				&& (this.getGroupopId() == castOther.getGroupopId());
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + this.getNgpId();
		result = 37 * result + this.getUdId();
		result = 37 * result + this.getGroupopId();
		return result;
	}

}